package cloud.keveri.springboot.starter.chat4j;

import cloud.keveri.chat4j.core.config.SupplierFactory;
import cloud.keveri.chat4j.provider.chatgpt.config.ChatgptConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

import static cloud.keveri.chat4j.api.def.Const.Chatgpt_Prefix;

/**
 * <p>
 * 作者：沈自在
 **/
public class SupplierConfig {

    /**
     * chatgpt配置自动装配
     */
    @Bean
    @ConfigurationProperties(prefix = Chatgpt_Prefix)
    private ChatgptConfig chatgptConfig() {
        return SupplierFactory.getChatgptConfig();
    }
}
